#!/usr/bin/python

reader = open("purpose.suffix", "r")
writer = open('purpose.suffix.dedup', "w")
pre = reader.readline()
pre = pre[0:-1]
writer.write(pre + "\n")
while True:
    line = reader.readline()
    if line == "":
        break
    line = line[0:-1]
    if line != pre:
        writer.write(line)
        writer.write('\n')
    pre = line
writer.close()
reader.close()
